// 统计数据模块 - 监控文件记录
import type { IPageQuery } from '@/api/types';

export type MonitorFileRecordQuery = IPageQuery & {
  fileName?: string;
  fileType?: string;
  status?: string;
  startDate?: string;
  endDate?: string;
  uploadUser?: string;
  fileSize?: number;
  isProcessed?: boolean;
  fileTag?: string;
  carNumber?: string;
  carNumberEmpty?: boolean;
};

export type MonitorFileRecordForm = {
  id?: number;
  fileName: string;
  filePath: string;
  fileType: string;
  fileSize: number;
  uploadUser: string;
  uploadTime: string;
  status: string;
  processTime?: string;
  errorMessage?: string;
  isProcessed: boolean;
  remark?: string;
  carNumber?: string; // 车辆编号
};

export type MonitorFileRecordInfo = {
  id?: number;
  fileName: string;
  filePath: string;
  fileType: string;
  fileSize: number;
  uploadUser: string;
  uploadTime: string;
  status: string;
  processTime?: string;
  errorMessage?: string;
  isProcessed: boolean;
  remark?: string;
  createTime: string;
  updateTime: string;
  delFlag?: string;
  fileUrl?: string; // 文件URL地址
  originalFilename?: string; // 原始文件名
  newFilename?: string; // 新文件名
  fileTag?: string; // 设备标记
  carNumber?: string; // 车辆编号
};

export type FileProcessForm = {
  id: number;
  action: string; // 'process' | 'reprocess' | 'delete'
  remark?: string;
};

export type FileStatistics = {
  totalFiles: number;
  processedFiles: number;
  failedFiles: number;
  pendingFiles: number;
  totalSize: number;
};